PL/SQL Table (merged) [message #280342] |
Tue, 13 November 2007 04:59 |
ramya29p
Messages: 146 Registered: November 2007 Location: Chennai
|
Senior Member |
|
|
Hi can anyone explain about index by table & its use......?
In the following code i would like to print all the column values of the table emp using index by table without using bulk collect method..pls suggest me...
declare
type emp_ty is table of emp%rowtype index by binary_integer;
var1 emp_ty;
cursor cur1 is select * from emp;
begin
open cur1;
loop
fetch cur1 bulk collect into var1;
exit when cur1%notfound;
end loop;
for i in var1.first..var1.last loop
dbms_output.put_line(var1(i).emp_name);
end loop;
end;
|
|
|
|
|
|
|
|